package s14.ch16.ex2;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;

public class MyTextStream {

	public static void main(String[] args) throws IOException {
Reader reader=new FileReader("input.txt");
Writer writer=new FileWriter("output.txt");
Integer data = null;
while ((data = reader.read()) != -1) {
	writer.write(data);
	System.out.println(data);
	System.out.println((char)data.intValue());
}
reader.close();
writer.close();
	}

}
